﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TireService.Data
{
    public class CustomerSubscriptionLogBLL
    {

        public void CreateCustomerSubscriptionLog(TireServiceDB db, CustomerSubscription customersubscription, int SubscriptionLogActionId, Guid UserId, string Note)
        {
            CustomerSubscriptionLog customersubscriptionlog = new CustomerSubscriptionLog();

            customersubscription.CustomerSubscriptionLogs.Add(customersubscriptionlog);
            customersubscriptionlog.SubscriptionId = customersubscription.SubscriptionId;
            customersubscriptionlog.CustomerId = customersubscription.CustomerId;
            customersubscriptionlog.SubscriptionLogActionId = SubscriptionLogActionId;
            customersubscriptionlog.UserId = UserId;
            if (Note != null) customersubscriptionlog.Note = Note;

            db.AddCustomerSubscriptionLog(customersubscriptionlog);
        }

    }
}
